Icons that are changed while an actor is not mapped may not have a theme
node associated with, and thus we'd end up not updating them at all.
In fact we return early in st_update_icon(), and this was not an issue
until commit
0b1dfbf6f3f, because we'd end up to update the icon anyways
once the style was changed (and so with a valid theme node), but since
such change we might not updating the icon if no theme detail changed.
To prevent this, add a flag to require an icon update when the theme
changed, if no successfully update happened earlier.
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4568
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1983>
gint theme_icon_size; /* icon size from theme node */
gint icon_size; /* icon size we are using */
GIcon *fallback_gicon;
+ gboolean needs_update;
StIconColors *colors;
should_update |= st_icon_update_icon_size (self);
- if (should_update)
+ if (priv->needs_update || should_update)
st_icon_update (self);
ST_WIDGET_CLASS (st_icon_parent_class)->style_changed (widget);
return;
}
+ priv->needs_update = TRUE;
+
theme_node = st_widget_peek_theme_node (ST_WIDGET (icon));
if (theme_node == NULL)
return;
priv->icon_size / paint_scale,
paint_scale,
resource_scale);
+ priv->needs_update = FALSE;
if (priv->pending_texture)
{